package com.calsoft.Hops_Mobile_Tablet.base;
/*
 * User: Minh Diep
 * Date: 6/27/13
 * Time: 10:28 AM
 */

import android.database.Cursor;
import com.calsoft.Hops_Mobile_Tablet.util.TimeUtil;

public class CardUIData {

    private int id;
    private int type;
    private String name;
    private int startTime;
    private int endTime;
    private String cardDesc;
    private String itemId;
    private String imageTag;

    public CardUIData(Cursor cursor){
        this.id = cursor.getInt(0);
        this.type = cursor.getInt(1);
        this.name = cursor.getString(2);
        this.startTime = cursor.getInt(3);
        this.endTime = cursor.getInt(4);
        this.cardDesc = cursor.getString(5);
        this.itemId = cursor.getString(6);
        this.imageTag = cursor.getString(7);
    }

    public CardUIData(int id, int type, String name, int startTime, int endTime, String cardDesc, String itemId, String imageTag) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.startTime = startTime;
        this.endTime = endTime;
        this.cardDesc = cardDesc;
        this.itemId = itemId;
        this.imageTag = imageTag;
    }

    public String getImageTag() {
        return imageTag;
    }

    public void setImageTag(String imageTag) {
        this.imageTag = imageTag;
    }

    public int getEndTime() {
        return endTime;
    }

    public String getStartTimeStrFormat(){
        return TimeUtil.getTimeStringOfDay(startTime);
    }

    public String getEndTimeStrFormat(){
        return TimeUtil.getTimeStringOfDay(endTime);
    }

    public void setEndTime(int endTime) {
        this.endTime = endTime;
    }

    public String getCardDesc() {
        return cardDesc;
    }

    public void setCardDesc(String cardDesc) {
        this.cardDesc = cardDesc;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        this.startTime = startTime;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
